package com.heima.task.job;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class HelloJob {

    /**
     * 每5秒执行一次这个方法
     */
    @Scheduled(cron = "0/10 * * * * ?")
    public void eat(){
        System.out.println("eating...."+new Date());

    }
}
